#include "MTAfunctional.h"

using namespace std;

namespace mta{
	void print::operator()(trainStopData* tsd){
		cout << *tsd << endl;
	}

	void printNameOnly::operator()(trainStopData* tsd){
		cout << tsd->get_stop_name() << endl;
	}

	onRoute::onRoute(char rt) : rt(rt) {}
	bool onRoute::operator()(trainStopData* tsd){
		return tsd->get_id()[0] == rt;
	}

	toTheLIRR::toTheLIRR(){
		set["128"];
		set["A28"];
		set["235"];
		set["D24"];
		set["248"];
		set["A46"];
		set["712"];
	}
	
	bool toTheLIRR::operator()(trainStopData* tsd){
		return set.find(tsd->get_id()) != set.end();
	}

	inHarlem::inHarlem(){
		set["D12"];
		set["A11"];
		set["301"];
		set["A14"];
		set["224"];
		set["A16"];
		set["302"];
		set["A12"];
		set["D13"];
		set["114"];
		set["115"];
		set["116"];
		set["225"];
		set["621"];
		set["A15"];
		set["118"];
		set["A17"];
		set["226"];
		set["622"];
	}
	bool inHarlem::operator()(trainStopData* tsd){
		return set.find(tsd->get_id()) != set.end();
	}
}